<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 加载部部样式及META信息 -->
    <title>管理员</title>
    <div th:replace="common/meta"></div>
    <script>
        require.config.jsname = "backend/${classname}/index";
        require.config.modulename = "admin"
        require.config.controllername = "auth.admin"
        require.config.actionname = "admin"
        require.config.moduleurl = "/admin/add"
    </script>
</head>
<body class="inside-header inside-aside is-dialog">
<div id="main" role="main">
    <div class="tab-content tab-addtabs">
        <div id="content">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                    <div class="content">
                        <form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator"
                              method="POST" action="/sys/${classname}/save">
            <#if items??>
                <#list items as item>
                    <#if item.name=='id'>
                    <#else>
                        <#if item.examples?? && (item.examples?size > 0)>
                            <div class="form-group">
                                <label for="${item.name}"
                                       class="control-label col-xs-12 col-sm-2">${item.label}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <select id="${item.name}" class="form-control selectpicker"
                                            data-rule="required" name="${item.name}">
                                            <option value="">请选择</option>
                                        <#list item.examples as example>
                                            <option value="${example}">${example}</option>
                                        </#list>
                                    </select>
                                </div>
                            </div>
                        <#else>
                            <div class="form-group">
                                <label for="${item.name}"
                                       class="control-label col-xs-12 col-sm-2">${item.label}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="${item.name}" name="${item.name}"
                                           data-rule="required"/>
                                </div>
                            </div>
                        </#if>
                    </#if>
                </#list>
            </#if>
                            <div class="form-group hidden layer-footer">
                                <label class="control-label col-xs-12 col-sm-2"></label>
                                <div class="col-xs-12 col-sm-8">
                                    <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
                                    <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:replace="common/script"></div>
</body>
